package com.itheima.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author liuyp
 * @since 2025/8/6
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("tb_user")
public class User {
    @TableId(value = "id", type = IdType.AUTO)//主键自增
    private Integer id;
    @TableField(value = "username")//名字不匹配
    private String uname;
    @TableField(value = "is_married")//is开头的
    private Boolean isMarried;
    @TableField(value = "`order`")//是sql关键字
    private Integer order;
    @TableField(exist = false)//表中没有对应字段的
    private String address;
}
